]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ScreenShield: don't add the source actor directly to the boxlayout
authorGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 14 Feb 2013 16:13:13 +0000 (17:13 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Sun, 17 Feb 2013 13:53:41 +0000 (14:53 +0100)
StBoxLayout always fills on the orthogonal direction, so the icon
becomes distorted as the layout grows to accomodate more details.
Instead, use a bin that aligns at the start.

https://bugzilla.gnome.org/show_bug.cgi?id=693822

js/ui/screenShield.js

index 0329381ae0f14a1361ddbbff44e376e0f70545e8..7e693be2c72a58ae90a9a8b376f721a11f6a4f7f 100644 (file)
@@ -204,7 +204,10 @@ const NotificationsBox = new Lang.Class({
 
     _makeNotificationDetailedSource: function(source, box) {
         let sourceActor = new MessageTray.SourceActor(source, SUMMARY_ICON_SIZE);
-        box.add(sourceActor.actor, { y_fill: true });
+        let sourceBin = new St.Bin({ y_align: St.Align.START,
+                                     x_align: St.Align.START,
+                                     child: sourceActor.actor });
+        box.add(sourceBin);
 
         let textBox = new St.BoxLayout({ vertical: true });
         box.add(textBox, { y_fill: false, y_align: St.Align.START });